let data = {}
// ![](http://110.41.142.138:2000/blogImg/202212021514951.webp)
// 请求方式
export default {
    'post|/login': opt => {
        // const {uid,pwd} = {opt.body}
        console.log(opt.body);//{"role":"teacher","teacher_id":"002","password":"666"}
        const { role, password } = JSON.parse(opt.body)
        const who_id = `${role}_id`
        const who_id_value = JSON.parse(opt.body)[who_id];

        data = { role, [who_id]: who_id_value, password }
        data.avatar = 'http://110.41.142.138:2000/blogImg/202212021514951.webp'
        const code = 200
        return {
            code,
            data
        }
    }
}